Monitoring Your Shared Resources
After a while, you
might lose track of which folders you’ve shared. You could look through
all your folders to look for those that have the Shared icon attached,
but that’s too much work, and you could easily miss some shared folder.
Fortunately, Windows 7 comes with a snap-in tool called Shared Folders
that enables you to monitor various aspects of the folders that you’ve
shared with the network. For example, for each shared folder, you can
find out the users who are connected to the folder, how long they’ve
been connected, and the files they have open. You can also disconnect
users from a shared folder or close files that have been opened on a
shared folder. The next few sections provide the details.
To get started, you need to open the Shared Folders snap-in: select Start, type fsmgmt.msc, and press Enter.
Viewing the Current Connections
To see a list of the users connected to any Windows 7 shared folder, select Shared Folders, Sessions. Figure 2 shows an example. For each user, you get the following data:
User | The name of the user. |
Computer | The name of the user’s computer. If Windows 7 doesn’t recognize the computer, it shows the machine’s IP address, instead. |
Type | The type of network connection. Windows 7 always shows this as Windows (even if the user is connected from a Mac or from Linux). |
Open Files | The number of open files in the shared folders. |
Connected Time | The amount of time that the user has been connected to the remote computer. |
Idle Time | The amount of time that the user has not been actively working on the open files. |
Guest | Whether the user logged on using the Guest account. |
Note
To ensure that
you’re always viewing the most up-to-date information, regularly select
the Action, Refresh command or click the Refresh toolbar button (pointed
out in Figure 2).
Viewing Connections to Shared Folders
The Shared Folders snap-in
also makes it possible for you to view the connections to Windows 7 by
its shared folders. To get this display, select Shared Folders, Shares.
As you can see in Figure 3, this view provides the following information:
Share Name | The name of the shared folder. Note that the list includes the Windows 7 hidden shares. |
Folder Path | The drive or folder associated with the share. |
Type | The type of network connection, which Windows 7 always shows as Windows. |
# Client Connections | The number of computers connected to the share. |
Description | The description of the share. |
Tip
You can also use the
Shares branch to work with the shared folders. For example, select a
share and then select Action, Open to display the folder. You can also
select Action, Properties to modify the share name, description, and
permissions of the selected share. Finally, you can also select Action,
Stop Sharing to turn off sharing on the selected folder.
Viewing Open Files
The Shared Folders
snap-in can also display the files that are open on the Windows 7
shares. To switch to this view, select System Tools, Shared Folders,
Open Files. Figure 4 shows the result. Here’s a summary of the columns in this view:
Open File | The full pathname of the file. |
Accessed By | The name of the user who has the file open. |
Type | The type of network connection, which Windows 7 always shows as Windows. |
# Locks | The number of locks on the file. |
Open Mode | The permissions the user has over the file. |
Closing a User’s Session or File
Although, in the
interest of network harmony, you’ll want to let users connect and
disconnect as they please, at times you might need to boot someone off a
machine. For example, you might see that someone has obtained
unauthorized access to a share. To disconnect that user, follow these
steps:
1. | In the Shared Folders snap-in, select Shared Folders, Sessions.
|
2. | Right-click the name of the user you want to disconnect.
|
3. | Click Close Session. Windows 7 asks you to confirm.
|
4. | Click Yes.
|
Similarly, you’ll
usually want to let users open and close files themselves so that they
don’t lose information. However, you might find that a user has a
particular file open and you would prefer that the user not view that
file (for example, because you want to work on the file yourself or
because the file contains information you don’t want the user to see).
To close a file opened by a user, follow these steps:
1. | In the Shared Folders snap-in, select Shared Folders, Open Files.
|
2. | Right-click the name of the file you want to close.
|
3. | Click Close Open File. Windows 7 asks you to confirm.
|
4. | Click Yes.
|
Caution
If you have a file in a
shared folder and you don’t want other users to see that file, it makes
more sense to either move the file to a protected folder or change the
permissions on the file’s current folder.
Note
The remote user doesn’t
see a warning or any other indication that you’re closing the file. For
example, if the user is playing a music file, that file just stops
playing and can’t be started again (except by closing all open shared
files and folders and starting a new session).